<div class="page-header position-relative">
	<h1>
		Quản Lý Hình Ảnh
	</h1>
</div><!--/.page-header-->
<div class="row-fluid">
	<div class="span12">
		<!--PAGE CONTENT BEGINS-->
		<div class="row-fluid">
			<a href="<?php echo Yii::app()->createUrl('store/backend/gallery/create'); ?>" class="btn btn-primary" title="Create New Album">
				<i class='icon-plus'></i>
				Create
			</a>
		</div>
		<hr>
		<div class="row-fluid">
			
			<?php if(isset($gallery)) : ?>
			<ul class="ace-thumbnails">	
				<?php foreach($gallery as $key => $value) :?>
					<?php if($value['Thumb_nails'] == 1) :?>			
						<li>
							<a href="<?php echo Yii::app()->createUrl('store/backend/gallery/view',array('id' => $value['gallery']['GalleryId'])); ?>" data-rel="colorbox" class="ace-thumbnails" title="<?php echo $value['gallery']['GalleryName']; ?>">
								<img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/images/products/<?php echo $value['ItemName']; ?>&h=150&w=150" />
								<div class="text">
									<div class="inner"><?php echo $value['gallery']['GalleryName']; ?></div>
								</div>
							</a>

							<div class="tools tools-bottom">
								<a href="<?php echo Yii::app()->createUrl('store/backend/gallery/view',array('id' => $value['gallery']['GalleryId'])); ?>" title="View Album">
									<i class="icon-eye-open"></i>
								</a>

								<a href="<?php echo Yii::app()->createUrl('store/backend/gallery/edit',array('id' => $value['gallery']['GalleryId'])); ?>" title="Modify Album">
									<i class="icon-pencil"></i>
								</a>

								<a href="<?php echo Yii::app()->createUrl('store/backend/gallery/delete',array('id' => $value['gallery']['GalleryId'])); ?>" title="Delete Album">
									<i class="icon-remove red"></i>
								</a>
							</div>
						</li>
					<?php endif; ?>
				<?php endforeach; ?>
			</ul>
			<?php endif; ?>
		</div><!--PAGE CONTENT ENDS-->
	</div><!--/.span-->
</div><!--/.row-fluid-->